/*
 *  Copyright 2003 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 */

/*
 *  ======== evmdm642_aic23_write32.c ========
 *  EVMDM642_AIC23_write() implementation
 */

#include <evmdm642.h>
#include <evmdm642_aic23.h>


/*
 *  ======== EVMDM642_AIC23_write32 ========
 *  Write a 32-bit value to the codec
 */
Int16 EVMDM642_AIC23_write32(EVMDM642_AIC23_CodecHandle hCodec, Uint32 val)
{
    /* If McBSP not ready for new data, return false */
    if ((MCASP_RGETH(EVMDM642_AIC23_hMcASP, SRCTL0) & 0x10) == 0) {
        return (FALSE);
    }

    /* Write data value */
    MCASP_RSETH(EVMDM642_AIC23_hMcASP, XBUF0, val);

    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");
    asm(" nop");

    return(TRUE);
}
